class Student:
    name = ''
    age = 0

    # 初始化方法（构造函数）
    def __init__(self, name, age):
        print('----执行初始化-----')
        self.name = name
        self.age = age

    def eat(self):
        print('干饭。。')


# 实例化学生对象
stu1 = Student("Jack", 20)
stu2 = Student("Lucy", 18)
print(stu1.name, stu1.age)
print(stu2.name, stu2.age)
stu1.eat()
